package com.example.demo.service;

import com.example.demo.mapper.UserMapper;
import com.example.demo.model.Userinfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserService {
    @Autowired
    private UserMapper userMapper;
    public Userinfo login(Userinfo userinfo) {
        return userMapper.login(userinfo);
    }
    //胜者数据库操作
    public int upGameadd(Integer userid) {
        return userMapper.upGameadd(userid);
    }

    //败者数据库操作
    public int upGamedel(Integer userid) {
        return userMapper.upGamedel(userid);
    }

    public int reg(Userinfo userinfo) {
        return userMapper.reg(userinfo);
    }

    public Userinfo getUser(Integer userid){
        return userMapper.getuser(userid);
    }
}
